from langchain.vectorstores import FAISS
from config.embedding_config import get_openai_embeddings_local, get_openai_embeddings_xin

embeddings = get_openai_embeddings_xin()

faiss_path = r"D:\model_code\pythonkonwledge\embeddings_\bert_\xin\model1"

db = FAISS.load_local(faiss_path, embeddings, normalize_L2=True, allow_dangerous_deserialization=True)

query = "西游记"
docs = db.similarity_search_with_score(query, k=3)
for doc in docs:
    print(doc)







